﻿@{
    ViewBag.Title = "SettSelectCyrq";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<form id="form1">
    <div style="padding-top: 20px; margin-right: 55px;">
        <table class="form">
            <tr>
                <th class="formTitle"><span class="required">*</span>出院日期：</th>
                <td class="formValue">
                    <input class="form-control input-wdatepicker required" id="cyrq" name="cyrq"
                           value=@DateTime.Now.ToString("yyyy-MM-dd") type="text"
                           onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd' })" />
                </td>
            </tr>
        </table>
    </div>
</form>

<script>
    var cyrq = $.request("cyrq");
    if (cyrq) {
        $('#cyrq').val($.getDate({ date: cyrq }));
        //$('#cyrq').attr('disabled', 'disabled');
    }
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        var date = $('#cyrq').val();
        if ($.getDate() < date) {   //一样的格式，可以直接比较大小
            $.modalAlert("不能进行提前出院结算", 'warning');
            return false;
        }
        return date;
    }
</script>
